package model;

import java.io.Serializable;
import java.math.BigDecimal;
import java.util.Date;
import java.util.List;

import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.GeneratedValue;
import javax.persistence.GenerationType;
import javax.persistence.Id;
import javax.persistence.JoinColumn;
import javax.persistence.ManyToOne;
import javax.persistence.OneToMany;
import javax.persistence.Table;
import javax.persistence.Temporal;
import javax.persistence.TemporalType;
import javax.persistence.Transient;

/**
 * The persistent class for the USERINFO database table.
 * 
 */
@Entity
@Table(name = "USERINFO")
public class Userinfo implements Serializable {
	private static final long serialVersionUID = 1L;

	@Id
	@GeneratedValue(strategy=GenerationType.AUTO)
	@Column(name="ID")
	private long id;

	@Column(nullable = false, length = 10)
	private String code;

	@Column(length = 20)
	private String cardno;

	@Column(nullable = false, precision = 10)
	private Long createby;

	@Column(precision = 6, scale = 4)
	private BigDecimal ticketdiscount;

	@Temporal(TemporalType.TIMESTAMP)
	@Column(nullable = false)
	private Date createtime;

	@Column(length = 50)
	private String email;

	@Column(length = 20)
	private String idcard;

	@Column(nullable = false, precision = 1)
	private Boolean islock;

	@Column(nullable = false, precision = 0)
	private Boolean isactive;

	@Column(nullable = false, precision = 1)
	private Boolean ismultipoint;

	@Column(nullable = false, length = 20)
	private String name;

	@Column(nullable = false, precision = 10)
	private Long orgid;

	@Column(nullable = false, length = 50)
	private String password;

	@Column(length = 20)
	private String phone;

	@Column(precision = 10)
	private Long updateby;

	@Temporal(TemporalType.TIMESTAMP)
	private Date updatetime;

	// bi-directional many-to-one association to Department
	@ManyToOne
	@JoinColumn(name = "DEPARTMENTID", nullable = false)
	private Department department;

	// bi-directional many-to-one association to Userrole
	@OneToMany(mappedBy = "userinfo")
	private List<Userrole> userroles;

	@Transient
	private Long roleids;
	 
	public Userinfo() {
	}

	public long getId() {
		return this.id;
	}

	public void setId(long id) {
		this.id = id;
	}

	public String getCode() {
		return this.code;
	}

	public void setCode(String code) {
		this.code = code;
	}

	public String getCardno() {
		return cardno;
	}

	public void setCardno(String cardno) {
		this.cardno = cardno;
	}

	public Long getCreateby() {
		return this.createby;
	}

	public void setCreateby(Long createby) {
		this.createby = createby;
	}

	public Date getCreatetime() {
		return this.createtime;
	}

	public void setCreatetime(Date createtime) {
		this.createtime = createtime;
	}

	public String getEmail() {
		return this.email;
	}

	public void setEmail(String email) {
		this.email = email;
	}

	public String getIdcard() {
		return this.idcard;
	}

	public void setIdcard(String idcard) {
		this.idcard = idcard;
	}


	

	public String getName() {
		return this.name;
	}

	public void setName(String name) {
		this.name = name;
	}

	public Long getOrgid() {
		return this.orgid;
	}

	public void setOrgid(Long orgid) {
		this.orgid = orgid;
	}

	public String getPassword() {
		return this.password;
	}

	public void setPassword(String password) {
		this.password = password;
	}

	public String getPhone() {
		return this.phone;
	}

	public void setPhone(String phone) {
		this.phone = phone;
	}

	public Long getUpdateby() {
		return this.updateby;
	}

	public void setUpdateby(Long updateby) {
		this.updateby = updateby;
	}

	public Date getUpdatetime() {
		return this.updatetime;
	}

	public void setUpdatetime(Date updatetime) {
		this.updatetime = updatetime;
	}

	public Department getDepartment() {
		return this.department;
	}

	public void setDepartment(Department department) {
		this.department = department;
	}

	public List<Userrole> getUserroles() {
		return this.userroles;
	}

	public void setUserroles(List<Userrole> userroles) {
		this.userroles = userroles;
	}

	public void setRoleids(Long roleids) {
		this.roleids = roleids;
	}

	public Long getRoleids() {
		return roleids;
	}

	public BigDecimal getTicketdiscount() {
		return ticketdiscount;
	}

	public void setTicketdiscount(BigDecimal ticketdiscount) {
		this.ticketdiscount = ticketdiscount;
	}

	public Boolean getIslock() {
		return islock;
	}

	public void setIslock(Boolean islock) {
		this.islock = islock;
	}

	public Boolean getIsactive() {
		return isactive;
	}

	public void setIsactive(Boolean isactive) {
		this.isactive = isactive;
	}

	public Boolean getIsmultipoint() {
		return ismultipoint;
	}

	public void setIsmultipoint(Boolean ismultipoint) {
		this.ismultipoint = ismultipoint;
	}



}